{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang admin_user_apply:admin}</h3>
		<ul class="submenus">
             <li {if $type=='1'}class="active"{/if}><a href="{url admin/apply?type=1}">{lang star:admin}</a></li>
             <li {if $type=='2'}class="active"{/if}><a href="{url admin/apply?type=2}">{lang store:admin}</a></li>
             <li {if $type=='3'}class="active"{/if}><a href="{url admin/apply?type=3}">{lang groupadmin:admin}</a></li>
             <li {if $status==='0'}class="active"{/if}><a href="{url admin/apply?status=0}">{lang waiting:admin}</a></li>
             <li {if $status=='1'}class="active"{/if}><a href="{url admin/apply?status=1}">{lang agreed:admin}</a></li>
             <li {if $status=='2'}class="active"{/if}><a href="{url admin/apply?status=2}">{lang disagreed:admin}</a></li>
             <li {if $status=='3'}class="active"{/if}><a href="{url admin/apply?status=3}">{lang recusaled:admin}</a></li>
		</ul>
	</div>
	<div class="alert alert-info mt10">
		<span class="label label-info">{lang info:admin}</span>
		{lang admin_user_apply_tip:admin}
	</div>
	<div class="setform">
		<table class="table table-striped">
        <thead>
          <tr>
            <th width="30">ID</th>
            <th width="30">{lang type:admin}</th>
            <th width="30">{lang category_name:admin}</th>
            <th width="50">Email</th>
            <th width="50">{lang th_nickname:admin}</th>
            <th width="150">{lang apply_content:admin}</th>
            <th width="30">{lang status:admin}</th>
            <th width="50">{lang operation:admin}</th>
          </tr> 
        </thead> 
        <tbody>
        {loop $applies $key $sm}
			<tr>  
			<td>$sm['apply_id']</td>
			<td>{if $sm['apply_type']==1}{lang star:admin}{elseif $sm['apply_type']==2}{lang store:admin}{elseif $sm['apply_type']==3}{lang groupadmin:admin}{/if}</td>
			<td>$sm['category_name']</td>
			<td>$sm['email']</td>
			<td>$sm['nickname']</td>
			<td>{if $sm['apply_type']==2}{lang store:admin}-<a href="{url store/review?storeid=$sm['store']['store_id']}" target="_blank">$sm['store']['store_name']</a> {/if}$sm['message_txt']</td>
			<td>{if $sm['status']==0}{lang waiting:admin}{elseif $sm['status']==1}{lang agreed:admin}{elseif $sm['status']==2}{lang disagreed:admin}{elseif $sm['status']==3}{lang recusaled:admin}{/if}</td>
			<td>{if $sm['status']!=1}<a href="{url admin/apply?act=agree&apid=$sm['apply_id']}">{lang agree:admin}</a>{/if} 
			{if $sm['status']!=2}<a href="{url admin/apply?act=disagree&apid=$sm['apply_id']}">{lang disagree:admin}</a>{/if} 
			{if $sm['status']!=3}<a href="{url admin/apply?act=recusal&apid=$sm['apply_id']}">{lang recusal:admin}</a>{/if} 
			<a href="{url admin/apply?act=delete&apid=$sm['apply_id']}">{lang delete:admin}</a></td>
          	</tr>
		{/loop}
          
        </tbody>
		</table>
		<div class="text_c">$pages</div>
	</div>
</div>
{template common/contentfooter}